﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace Golf.Core
{
    public class Scorecard : BusinessObjectBase
    {
        public Course Course { get; set; }
        public Player Player { get; set; }
        public DateTime Date { get; set; }
        public IEnumerable<Score> Scores { get; set; }

        public int Strokes
        {
            get
            {
                return (from score in Scores select score.Strokes).Sum();
            }
        }
    }
}